@extends('layouts.admin')

@section('content')
<section id="main-content">
          <section class="wrapper">
              <!-- page start-->
             
              <div class="row">
               <div class="col-sm-12">
                  <section class="panel">
                      
                      <div class="panel-body">
                          <a href="{{ route('admin.wechat.reply') }}" type="button" class="btn btn-info ">文字回复</a>
                              <a href="{{ route('admin.wechat.reply.news') }}" type="button" class="btn btn-primary ">图文回复</a>
                 
                      </div>
                      </section>
              </div>
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                              更新文字回复
                          </header>
                          <div class="panel-body">
                                @if (count($errors) > 0)
                                <div class="alert alert-block alert-danger fade in">
                                  <button data-dismiss="alert" class="close close-sm" type="button">
                                      <i class="icon-remove"></i>
                                  </button>
                                  <!-- <strong>Oh snap!</strong> Change a few things up and try submitting again. -->
                                   <ul>
                                        @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li> 
                                        @endforeach
                                    </ul>
                              </div>
                              @endif
                              <form class="form-horizontal" action="{{ route('admin.wechat.reply.update',['id'=>$reply->id])}}" method="POST" role="form">
                                  <div class="form-group">
                                      <label for="inputEmail1" class="col-lg-2 col-sm-2 control-label">规则名称</label>
                                      <div class="col-lg-10">
                                          <input type="text" class="form-control" id="Name" name="name" placeholder="Name" value="{{ $reply->name }}">
                                          <p class="help-block"></p>
                                      </div>
                                  </div>
                                  <div class="form-group">
                                      <label for="inputEmail1" class="col-lg-2 col-sm-2 control-label">关键字</label>
                                      <div class="col-lg-10">
                                          <input type="text" class="form-control" id="Keyword" name="keyword" value="{{ $reply->keyword }}" placeholder="Keyword">
                                          <p class="help-block"></p>
                                      </div>
                                  </div>
                                  <div class="form-group">
                                      <label for="inputEmail1" class="col-lg-2 col-sm-2 control-label">正则表达式</label>
                                      <div class="col-lg-10">
                                          <input type="text" class="form-control" id="Regular" name="regular"  value="{{ $reply->regular }}"placeholder="Regular">
                                          <p class="help-block"></p>
                                      </div>
                                  </div>
                                  
                                  <div class="form">

                                              <div class="form-group">
                                                  <label class="col-sm-2 control-label col-sm-2">内容</label>
                                                  <div class="col-sm-10">
                                                      <textarea class="form-control ckeditor" name="content" rows="6">{{ $reply->content }}</textarea>
                                                  </div>
                                              </div>
                                   
                                      </div>
                                  <div class="form-group">
                                      <div class="col-lg-offset-2 col-lg-10">
                                            {{ csrf_field() }}
                                            <input type="hidden" class="form-control" id="msgtype" name="msgtype" value="text" />
                                          <button type="submit" class="btn btn-danger">提交</button>
                                      </div>
                                  </div>
                                  
                              </form>
                          </div>
                      </section>
                      
                  </div>
              </div>

             
              <!-- page end-->
          </section>
      </section>
@endsection
@section('javascript')
  @parent
  <!-- <script type="text/javascript" src="{{ asset('backend/assets/ckeditor/ckeditor.js') }}"></script> -->
<!-- <script src="{{ asset('backend/js/form-component.js') }}"></script> -->
@endsection

